﻿@using Nxg.Blog.Core.Extensions
@{
    Layout = "_Layout";
}
@model Nxg.Blog.Core.ViewProjections.Home.BlogPostDetailsViewModel
@section PostStyles{
<link href="~/css/markdown.css" rel="stylesheet" />
}
<div class="main">
    <div class="container">
        <article class="post-wrap">
            <header class="post-header">
                <h1 class="post-title">@Model.Title</h1>
                <div class="post-meta">
                    Author: <a itemprop="author" rel="author" href="javascript:;">@Model.AuthorDisplayName</a>
                    <span class="post-time">
                        Date: <a href="javascript:;">@Model.PubDate</a>
                    </span>
                    <span class="post-category">
                        @if (Model.Category != null)
                        {
                            <a href="/category/@Model.Category.Name">@Model.Category.DisplayName</a>
                        }
                    </span>
                </div>
            </header>
            <div class="post-content" id="content">
                @Html.Raw(@Model.Content)
            </div>
            <section class="post-tags">
                <div>
                    <span>Tag(s):</span>
                    <span class="tag">
                        @foreach (var tag in Model.Tags)
                        {
                            <a href="/tag/@tag"># @tag</a>
                        }
                    </span>
                </div>
                <div>
                    <a href="javascript:window.history.back();">back</a>
                    <span>· </span>
                    <a href="/">home</a>
                </div>
            </section>
            <section class="post-nav">
                @if (!string.IsNullOrEmpty(Model.Pre.Item1))
                {
                    <a class="prev" rel="prev" href="@Model.Pre.Item2">@Model.Pre.Item1</a>
                }
                @if (!string.IsNullOrEmpty(Model.Next.Item1))
                {
                    <a class="next" rel="next" href="@Model.Next.Item2">@Model.Next.Item1</a>
                }
            </section>
        </article>
    </div>
</div>